﻿
@{
	ViewBag.Title = "File Manager";
}

<h2>@ViewBag.Title</h2>

<div id="filemanager">
	
</div>

@section head {
	@Cms.ScriptInclude("Themes/Admin/Scripts/elfinder/js/elfinder.min.js")
	@Cms.ScriptInclude("Themes/Admin/Scripts/elfinder/js/proxy/elFinderSupportVer1.js")
	@Cms.CssLink("Themes/Admin/Scripts/elfinder/css/elfinder.min.css")
	@Cms.CssLink("Themes/Admin/Scripts/elfinder/css/theme.css")
}

<script type="text/javascript">
	$(document).ready(function () {
		$('#filemanager').elfinder({
			url: "@Url.Action("Finder", "Files")",
			transport: new elFinderSupportVer1(),
			height: 500,
			uiOptions: {
				toolbar: [
					['back', 'forward'],
					['mkdir', 'upload'],
					['open', 'download', 'getfile'],
					['info'],
					['quicklook'],
					['copy', 'cut', 'paste'],
					['rm'],
					['rename', 'resize'],
					['view'],
					['help']
				]
			},
			contextmenu: {
				// navbarfolder menu
				navbar:
					['open', '|', 'copy', 'cut', 'paste', '|', 'rm', '|', 'info'],
				// current directory menu
				cwd:
					['back', '|', 'upload', 'mkdir', 'paste', '|', 'info'],
				// current directory file menu
				files:
					['getfile', '|', 'open', 'quicklook', '|', 'download', '|', 'copy', 'cut', 'paste', '|', 'rm', '|', 'edit', 'rename', 'resize', '|', '|', 'info']
			}
		}).elfinder("instance");
	})
</script>